#coding=utf-8
import unittest
import os,sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'jiekouauto')))
print(sys.path)
def add_case(case=os.path.join(os.path.dirname(__file__),'jiekouauto'),rule='test*.py'):
    discover=unittest.defaultTestLoader.discover(case,pattern=rule,top_level_dir=None)
    # print('一共%s条用例'%len(discover))
    return discover
runner=unittest.TextTestRunner()
runner.run(add_case())
if __name__ == '__main__':
    unittest.main(verbosity=2)

